﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data.Entity;
using UniSoft.ERP.EntityFramework.Mapping;

namespace UniSoft.ERP.EntityFramework.Context
{
    public class EntityFrameworkContext : DbContext
    {
        public EntityFrameworkContext()
            : base()
        {
            Database.Connection.ConnectionString = @"Data Source=.\SQL2008;Initial Catalog=UniSoft;Persist Security Info=True;User ID=sa;Password=cl3r1t0n";
            Database.SetInitializer<EntityFrameworkContext>(null);
        }

        protected override void OnModelCreating(DbModelBuilder modelBuilder)
        {
            modelBuilder.Configurations.Add(new ProcedenciaTituloMapping());
            base.OnModelCreating(modelBuilder);
        }
    }
}
